package tv.acgn.advertisement.publish.po.unit_condition;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * @program: advertisement-ad-pub-po
 * @description: 推广单元 地区
 * @author: junG
 * @create: 2019-04-29 23:38
 **/

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ad_unit_district")
@Entity
@DynamicInsert
@DynamicUpdate
public class AdUnitDistrict {

    @Id
    @Column(name = "district_id", nullable = false, unique = true, length = 64)
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    private String districtId;

    /**
     * 区域限制 等级 国家/地区级
     */
    @Column(name = "state", nullable = false)
    private String state;

    /**
     * 区域限制 等级 省/自治区/特区 顶级行政区
     */
    @Column(name = "province", nullable = false)
    private String province;

    /**
     * 区域限制 等级 州/地/市级 二级行政区
     */
    @Column(name = "city", nullable = false)
    private String city;

    /**
     * 区域限制 等级 郡县级 三级行政区
     */
    @Column(name = "county", nullable = false)
    private String county;
}
